<?php
//包含连接数据库的公共文件
require_once("./conn.php");


    //获取表单提交数据
    $specialty_id=$_POST["specialty_id"];
    $zon=$_POST["zon"];
    $zname=$_POST["zname"];

    //构建插入SQL语句
    $sql="insert into specialty values('$specialty_id','$zon','$zname')";
    echo $sql;
    $set=mysqli_query($con,$sql);
    if($set==1){
        echo "<script>alert('添加成功');location='show_specialty.php';</script>";
    }else{
        echo "<script>alert('添加失败');location='add_specialty.html';</script>";
    }


?>